<include file="public@header" />
</head>
<body >
	<div class="wrap ">
		<ul class="nav nav-tabs">
			<li><a href="{:url('goods/front')}">{:lang('ADMIN_GOODS_FRONT')}</a></li>
			<li class="active"><a href="{:url('goods/addfront')}">{:lang('商品添加')}</a></li>
		</ul>
		<form class="form-horizontal js-ajax-form" action="{:url('Goods/add_post')}" method="post" enctype="multipart/form-data">
        	<input type="hidden" name="room" value="1">
            <fieldset>
				<div class="control-group">
					<label class="control-label">{:lang('GOODS_NAME')}</label>
					<div class="controls">
						<input type="text" class="form-control" name="goods_name" value="" id="goods_name"/>
						<span class="form-required">*</span>
					</div>
				</div>
                <div class="control-group">
					<label class="control-label">{:lang('GOODS_CATE')}</label>
					<div class="controls">
                    	<select name="" class="form-control">
                        	<option value="类型1">固定资产</option>
                        	<option value="类型2">耗材</option>              
                        </select>
					</div>
				</div>
                <div class="control-group normal">
					<label class="control-label">{:lang('PRICE')}</label>
					<div class="controls">
						<input type="text" class="form-control" name="price" value="" id="price"/>
						<span class="form-required">*</span>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label">{:lang('NUM')}</label>
					<div class="controls">
						<input type="text" class="form-control" name="stock" value="" id="stock"/>
                        <span class="form-required">*</span>
					</div>
				</div>
                <div class="control-group">
					<label class="control-label">{:lang('SUPPLIER')}</label>
					<div class="controls">
						<input type="text" class="form-control" name="encoding" value=""/>
					</div>
				</div>
                <div class="control-group">
					<label class="control-label">排序</label>
					<div class="controls">
						<input type="text" class="form-control" name="listorder" value="255"/>
                        <span class="form-required">商品默认升序排序</span>
					</div>
				</div>
                
                <div class="control-group">
					<label class="control-label">{:lang('商品图片')}</label>
					<div class="controls">
                        <input type="hidden" name="photos_url" id="photos_url" value="">
                        <img height="36" src="" class="preview isHide" id="photos_url_preview" />
						<a class="btn btn-primary" onClick="upload_one_image('商品图片', '#photos_url')">{:lang("UPLOAD")}</a>
						<span class="form-required">*</span>
					</div>
				</div>
                <div class="control-group">
					<label class="control-label">{:lang('商品描述')}</label>
					<div class="controls">
						<textarea name="description" class="form-control" style="width:400px;height:100px;"/></textarea>
					</div>
				</div>
                <div class="control-group">
					<label class="control-label">{:lang('IF_SHOW')}</label>
					<div class="controls">
                    	<input type="radio" name="if_show">是
                    	<input type="radio" name="if_show"> 否       
					</div>
				</div>                
			</fieldset>
			<div class="form-actions">
				<button type="submit" class="btn btn-primary js-ajax-submit">{:lang('ADD')}</button>
				<a class="btn btn-default" href="javascript:history.back(-1);">{:lang('BACK')}</a>
			</div>
		</form>
	</div>
    <admintpl file="Goods/include"/>
	<script type="text/javascript">
        $("#btn").click(function(){
            upload_one("视频上传", "#video_path", "video");
        });
		
    </script>
</body>
</html>